//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES.
//

#ifndef __CAMDLL_H_INCLUDED__
#define __CAMDLL_H_INCLUDED__

//#ifdef RETAIL_DEBUG
//#ifndef DEBUG
//#define DEBUG
//#undef DEBUGMSG
//#define DEBUGMSG RETAILMSG
//#endif
//#endif

//#ifdef DEBUG
#ifdef __cplusplus
extern "C" {
#endif

#define DEBUGMASK(bit)       (1 << (bit))

#define MASK_ERROR           DEBUGMASK(0)
#define MASK_WARN            DEBUGMASK(1)
#define MASK_INIT            DEBUGMASK(2)
#define MASK_FUNCTION        DEBUGMASK(3)
#define MASK_IOCTL           DEBUGMASK(4)
#define MASK_DEVICE          DEBUGMASK(5)
#define MASK_PDDCAM          DEBUGMASK(7)
#define MASK_PDDINT          DEBUGMASK(8)
#define MASK_POWER           DEBUGMASK(9)
#define MASK_I2C             DEBUGMASK(13)
#define MASK_DMA             DEBUGMASK(15)
#define MASK_IRQ             DEBUGMASK(14)


#define CAMMSG(cond,printf_exp)	 \
   (NKDbgPrintfW printf_exp)
   
// this will make all the debug msgs retail for debugging in retail mode
//#undef DEBUGMSG
//#define DEBUGMSG RETAILMSG


#ifndef SHIP_BUILD
static DBGPARAM dpCurSettings = {
    _T("Camera"), 
    {
        _T("Errors"), _T("Warnings"), _T("Init"), _T("Function"), 
        _T("Ioctl"), _T("Device"), _T("Activity"), _T("PDDCAM"),
        _T("PDDINT"),_T("Power"),_T(""),_T(""),
        _T(""),_T("I2C"),_T("Irq"),_T("DMA") 
    },

    MASK_ERROR | MASK_WARN |MASK_FUNCTION |MASK_PDDCAM |MASK_PDDINT|MASK_IRQ|MASK_DMA|
	0
}; 
#endif




#ifndef SHIP_BUILD
#define ZONE_ERROR           DEBUGZONE(0)
#define ZONE_WARN            DEBUGZONE(1)
#define ZONE_INIT            DEBUGZONE(2)
#define ZONE_FUNCTION        DEBUGZONE(3)
#define ZONE_IOCTL           DEBUGZONE(4)
#define ZONE_DEVICE          DEBUGZONE(5)
#define ZONE_ACTIVITY	 	 DEBUGZONE(6)
#define ZONE_PDDCAM          DEBUGZONE(7)
#define ZONE_PDDINT          DEBUGZONE(8)
#define ZONE_POWER           DEBUGZONE(9)
#define ZONE_I2C			 DEBUGZONE(13)
#define ZONE_IRQ             DEBUGZONE(14)
#define ZONE_DMA             DEBUGZONE(15)
#endif

#ifdef __cplusplus
}
#endif

#endif // __CAMDLL_H_INCLUDED__
